package com.zjxmyq.authorization.controllers;

import com.zjxmyq.authorization.domain.User;
import com.zjxmyq.authorization.service.LoginService;
import jakarta.annotation.Resource;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class LoginController {

    @Resource
    LoginService loginService;
    @RequestMapping("login")
    public String login(String str){
        return loginService.testLogin();
    }

    @RequestMapping(value = "testAuth",method = RequestMethod.POST)
    public String testApi(@RequestBody User user){
        return loginService.testAuth(user);
    }
}
